1. Field of the Invention
The present invention relates to a magnetic sensor for use to detect the direction of an external magnetic field.
2. Description of the Related Art
In recent years, magnetic sensors have been widely used to detect the rotational position of an object in various applications such as detecting the rotational position of an automotive steering wheel. Linear encoders for detecting a linear displacement of an object also use magnetic sensors. Such systems using magnetic sensors are typically provided with means (for example, a magnet) for generating an external magnetic field whose direction rotates in conjunction with the rotation or linear movement of the object. Magnetic sensors detect the angle that the direction of the external magnetic field in a reference position forms with respect to a reference direction. The rotational position or linear displacement of the object is thus detected.
Among known magnetic sensors is one that employs a spin-valve magnetoresistive (MR) element, as disclosed in U.S. Patent Application Publication No. 2011/0025320 A1 and JP 2008-157844 A. The spin-valve MR element includes a first ferromagnetic layer, a nonmagnetic layer, and a second ferromagnetic layer stacked in this order. One of the first and second ferromagnetic layers is a magnetization pinned layer whose magnetization direction is pinned, and the other is a free layer whose magnetization direction varies according to the direction of an external magnetic field.
Further, also known as a magnetic sensor is one that includes a plurality of MR elements of current-perpendicular-to-plane (CPP) type connected in series, as disclosed in U.S. Patent Application Publication No. 2011/0025320 A1. A plurality of MR films (in a stack) disclosed in this U.S. publication correspond to the plurality of MR elements of CPP type mentioned above. An MR element of CPP type is such that a current for use in magnetic signal detection is fed in a direction generally perpendicular to the planes of layers constituting the MR element.
To connect a plurality of MR elements of CPP type in series, it is necessary to provide an electrode for electrical connection between respective end faces of two adjacent MR elements. The electrode is typically shaped to be constant in width and elongated in one direction so as to be placed across the two MR elements.
U.S. Pat. No. 7,998,758 B2 and Kou et al., “Development of Highly Sensitive Terrestrial Sensor using TMR Junctions”, Journal of the Magnetics Society of Japan, Vol. 32, No. 3, pp. 361-365 (2008) each disclose an electrode that is in contact with an end face of an MR element. The electrode has a narrow portion elongated in one direction, and two wide portions greater in width than the narrow portion and coupled to opposite ends of the narrow portion in the longitudinal direction. The electrode is configured so that a portion located at the longitudinal center of the narrow portion is in contact with the end face of the MR element.
Studies conducted by the inventors of this application have shown that a magnetic sensor including a plurality of serially connected MR elements of CPP type may have the following problem if the electrode in contact with the end faces of the MR elements is shaped to be constant in width and elongated in one direction. When expansion or contraction of the electrode or the material therearound occurs due to, for example, a change in temperature around the magnetic sensor, stress will be produced in the electrode, and this will in turn induce stress in the MR elements in contact with the electrode. Here, if the electrode is shaped to be constant in width and elongated in one direction, the stress induced in the MR elements by the electrode has anisotropy such that the magnitude of the stress varies according to direction. In this case, if the first and second ferromagnetic layers of the MR elements have a non-zero magnetostriction constant, the first and second ferromagnetic layers will have a stress magnetic anisotropy. The stress magnetic anisotropy may cause degradation in the detection accuracy of the magnetic sensor.